fun map(f, xs) =
	case xs of 
		[]  => []
	|	a::xs' => (f a)::map(f, xs')

val t = map((fn x => x*2),[2,3,4])

fun filter(f, xs) = 
	case xs of
		[] => []
		| x::xs' => if f x 
						then x::filter(f, xs')
						else filter(f, xs')

val t = filter((fn x => (x mod 2 = 0)), [2,3,4,4,5,6,7])

val x := 
	
fun fold (f, acc, xs) =
	case xs of 
		[] => acc
	|	x::xs' => fold(f, (f(x,acc)), xs')

val ans = fold((fn (x,y) => x * y), 1, [1,2,3,4])


val currying = fn x => fn y => fn z => x + y + z

val ans_currying = currying 1 2 3

